package com.net.xpay.common.dao.sync;

import com.net.xpay.common.domain.sync.CommonChargeRecord;
import com.net.common.dao.Page;
import com.net.common.dao.PagedMapper;
import com.net.common.annotation.DataShard;
import com.net.xpay.core.model.ChargeRecordSearchModel;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.time.LocalDateTime;
import java.util.List;

@DataShard("")
@Repository
public interface CommonChargeRecordMapper extends PagedMapper<Long, CommonChargeRecord> {

    List<CommonChargeRecord> search(@Param("searchModel") ChargeRecordSearchModel searchModel, @Param("page") Page page);

    long searchCount(@Param("searchModel") ChargeRecordSearchModel searchModel);

    long sumSuccessAmount(@Param("userId")Long userId,@Param("endMinTime") LocalDateTime endMinTime,@Param("endMaxTime") LocalDateTime endMaxTime);

    List<CommonChargeRecord> list(@Param("searchModel")ChargeRecordSearchModel searchModel);
}
